'''
# 获取列表中偶数
def get_even_numbers(begin, end):
    result = []
    for item in range(begin, end):
        if item % 2 == 0:
           result.append(item)
    return result


begin = 4
end = 15
print(f"begin = {begin}, end = {end}, even numbers : ", get_even_numbers(begin, end))

'''

begin = 4
end = 15

#使用列表推导式
data = [item for item in range(begin, end) if item % 2 == 0]
print(f"begin = {begin}, end = {end}, even numbers : ", data)






